/**
 * Created by Administrator on 2017/1/17.
 */

var config = require('./config');

module.exports = {

    /**
     * 检查创建房间的参数
     * @param args
     * @return -1 表示参数不正确，
     */
    checkCreateRoomArgs: function(args) {
        if (!args.gameType || !args.subType || !args.round) {
            return false;
        }

        if (!config.RoundCard.hasOwnProperty(args.round)) {
            return false;
        }

        return true;
    },

    /**
     * 创建房间需要消耗的资源
     * @param args
     */
    calcCreateRoomNeedResource: function(args) {
        return {
            "card": config.RoundCard[args.round],
        }
    }
}